import Data.List (tails)

combinations :: Int -> [a] -> [[a]]
combinations 0 _ = [[]]
combinations n xs = [y : ys | y : xs' <- tails xs, ys <- combinations (n - 1) xs']

te2 = combinations 2 [1 .. 4]

te3 = combinations 3 [1 .. 4]

te4 = combinations 4 [1 .. 4]

te5 = combinations 5 [1 .. 4]

teb xs = [y : ys | y : xs' <- tails xs, ys <- [xs']]

tec xs = [ys | y : ys <- tails xs]

ted xs = [y | y <- tails xs]